package com.school.tool;

import com.school.model.ResultModel;

public class Result {

    public static ResultModel success(){
        ResultModel resultModel=new ResultModel();
        resultModel.setResultMessage("SUCCESS");
        resultModel.setResultCode(200);
        return resultModel;
    }

    public static ResultModel success(Object obj){
        ResultModel resultModel=new ResultModel();
        resultModel.setObj(obj);
        resultModel.setResultMessage("SUCCESS");
        resultModel.setResultCode(200);
        return resultModel;
    }

    public static ResultModel error(String message){
        ResultModel resultModel=new ResultModel();
        resultModel.setResultMessage(message);
        resultModel.setResultCode(500);
        return resultModel;
    }
}
